/**
 * 
 */
package datatypes;

import static org.junit.Assert.*;

import java.awt.Color;

import org.junit.Before;
import org.junit.Test;

import de.dhbw.horb.inf2013.vierFarbenProblem.model.datatypes.ColoredVertex;
import de.dhbw.horb.inf2013.vierFarbenProblem.model.datatypes.NoColorSetException;

/**
 * The Class ColoredVertexTest.
 */
public class ColoredVertexTest extends VertexTest{

	/** The cv. */
	private ColoredVertex cv;

	/* (non-Javadoc)
	 * @see VierFarben.Datatypes.VertexTest#inizialisatVertex()
	 */
	@Before
	public void inizialisatVertex(){
		this.v = new ColoredVertex(1);
		this.cv = new ColoredVertex(2);
	}

	/**
	 * Test color.
	 *
	 * @throws NoColorSetException the no color set exception
	 */
	@Test
	public void testColor() throws NoColorSetException {
		cv.setColor(Color.black);
		
		assertEquals(Color.black, cv.getColor());
	}
	
	/**
	 * Test color no.
	 *
	 * @throws NoColorSetException the no color set exception
	 */
	@Test(expected=NoColorSetException.class)
	public void testColorNo() throws NoColorSetException {		
		assertEquals(Color.black, cv.getColor());
	}

}
